/**
 *
 */
package org.t2.backstage.module.player.model;

import org.banish.sql.core.annotation.Column;
import org.banish.sql.core.annotation.Id;
import org.banish.sql.core.annotation.Index;
import org.banish.sql.core.annotation.Table;
import org.banish.sql.core.annotation.Id.Strategy;
import org.banish.sql.core.entity.AbstractEntity;
import org.gaming.service.repository.annotation.NoCache;
import org.springframework.stereotype.Repository;

/**
 * @author YY
 *
 */
@Repository
@NoCache
@Table(comment = "玩家信息表", dbAlias = "backdata", indexs = {
		@Index(fields = { "channelId", "openId" }) })
public class Player extends AbstractEntity {
	@Id(strategy = Strategy.IDENTITY)
	@Column(comment = "玩家ID，全平台唯一")
	private long id;
	@Column(comment = "平台ID")
	private long platformId;
	@Column(comment = "渠道ID")
	private long channelId;
	@Column(comment = "账户ID")
	private String openId;
	@Column(comment = "服务器ID")
	private int serverId;
	@Column(comment = "昵称")
	private String nick;
	@Column(comment = "等级")
	private int level;
	@Column(comment = "VIP等级")
	private int vipLevel;
	@Column(comment = "充值金额")
	private long recharge;
	@Column(comment = "是否在线")
	private boolean online;
	@Column(comment = "创号时间", extra = "time")
	private long bornTime;
	@Column(comment = "最后登录时间", extra = "time")
	private long lastLoginTime;
	@Column(comment = "最后登出时间", extra = "time")
	private long lastLogoutTime;
	@Column(comment = "登录IP", length = 50)
	private String loginIp;
	@Column(comment = "封号结束时间", extra = "time")
	private long forbidEndTime;
	@Column(comment = "设备型号")
	private String deviceModel;
	@Column(comment = "封榜结束时间", extra = "time")
	private long forbidRankTime;
	
	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public String getOpenId() {
		return openId;
	}

	public void setOpenId(String openId) {
		this.openId = openId;
	}

	public String getNick() {
		return nick;
	}

	public void setNick(String nick) {
		this.nick = nick;
	}

	public int getLevel() {
		return level;
	}

	public void setLevel(int level) {
		this.level = level;
	}

	public int getServerId() {
		return serverId;
	}

	public void setServerId(int serverId) {
		this.serverId = serverId;
	}

	public long getChannelId() {
		return channelId;
	}

	public void setChannelId(long channelId) {
		this.channelId = channelId;
	}

	public boolean isOnline() {
		return online;
	}

	public void setOnline(boolean online) {
		this.online = online;
	}

	public long getRecharge() {
		return recharge;
	}

	public void setRecharge(long recharge) {
		this.recharge = recharge;
	}

	public long getPlatformId() {
		return platformId;
	}

	public void setPlatformId(long platformId) {
		this.platformId = platformId;
	}

	public int getVipLevel() {
		return vipLevel;
	}

	public void setVipLevel(int vipLevel) {
		this.vipLevel = vipLevel;
	}

	public long getBornTime() {
		return bornTime;
	}

	public void setBornTime(long bornTime) {
		this.bornTime = bornTime;
	}

	public long getLastLoginTime() {
		return lastLoginTime;
	}

	public void setLastLoginTime(long lastLoginTime) {
		this.lastLoginTime = lastLoginTime;
	}

	public long getLastLogoutTime() {
		return lastLogoutTime;
	}

	public void setLastLogoutTime(long lastLogoutTime) {
		this.lastLogoutTime = lastLogoutTime;
	}

	public String getLoginIp() {
		return loginIp;
	}

	public void setLoginIp(String loginIp) {
		this.loginIp = loginIp;
	}

	public long getForbidEndTime() {
		return forbidEndTime;
	}

	public void setForbidEndTime(long forbidEndTime) {
		this.forbidEndTime = forbidEndTime;
	}

	public String getDeviceModel() {
		return deviceModel;
	}

	public void setDeviceModel(String deviceModel) {
		this.deviceModel = deviceModel;
	}

	public long getForbidRankTime() {
		return forbidRankTime;
	}

	public void setForbidRankTime(long forbidRankTime) {
		this.forbidRankTime = forbidRankTime;
	}
}
